home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0006-Solved {ObjApp} ?-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-02  |  1.3 KB  |  40 lines  |  [TEXT/GEOL]

  1. Item    5687361                         2-Oct-89        14:42
  2.  
  3. From:   D2086                           Efficient Field Svc, C Faith,PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.         MACDTS                          Macintosh Developer Tech. Supt.
  7.  
  8. Sub:    Solved {ObjApp} ?
  9.  
  10. Hello,
  11.  
  12. It seems that frequently when I finally set down and write a link to ask a
  13. question I have been meaning to ask, I also spend enough time solving the
  14. problem that I answer it myself.
  15.  
  16. The problem I have been having gaining access to the {SrcApp} and {ObjApp}
  17. variables is solved by this:
  18.  
  19. Don't run MABuild directly but use:
  20.  
  21. execute MABuild
  22.  
  23. It seems that when you run a script all the variables of the script disappear
  24. after it is run.  Execute takes the script and runs the contents as if it were
  25. in the current scope, it does not create another scope.
  26.  
  27. The definition for execute states: "This means that the variable definitions,
  28. exports, and aliases will continue to exist after it has finished. (Normally
  29. these definitions, exports and aliases would be local to the script.)"
  30.  
  31. I was always under the impression that export would take a variable and make
  32. its scope global.  It does not do this, it rather makes a variable available to
  33. scripts and scopes inside the current scope, not outside.  It seems Export is a
  34. bad name (by my way of thinking).
  35.  
  36.  
  37. - Curtis
  38.  
  39.  
  40.